using UnityEngine;

public class QualityLayer : MonoBehaviour
{
	protected int desiredHeight;

	protected float height;

	public UISprite sprite;

	public UILabel label;

	public float duration = 0.1f;

	public float time;

	public void SetDesiredHeight(int height, float time)
	{
		desiredHeight = height;
		this.height = sprite.height;
		time = 0f;
	}

	private void Update()
	{
		time += RealTime.deltaTime;
		float t = time / duration;
		sprite.height = (int)Mathf.Lerp(height, desiredHeight, t);
	}
}
